package com.learn.pager;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void openActivity(View view) {
        int id = view.getId();
        if (id == R.id.btn1) {
            startActivity(new Intent(this, ViewPagerActivity.class));
        } else if (id == R.id.btn2) {
            startActivity(new Intent(this, TitleViewPagerActivity.class));
        } else if (id == R.id.btn3) {
            startActivity(new Intent(this, CustomViewPagerActivity.class));
        } else if (id == R.id.btn4) {
            startActivity(new Intent(this, FragmentViewPagerActivity.class));
        }
    }
}
